package com.hfzy.ihk.facade.websocket.linkcall.service;

/**
 * Created by Administrator on 2016/11/22.
 *
 * @author wws
 *
 * webSocket服务
 *
 * 接收后端服务器需要推送的数据
 *
 */
public interface WebSocketService {

    public boolean pushToBrowserByUserId(String userId, String json);

    public boolean pushToBrowserByUserId4ChromePlugin(String userId, String json);

    public boolean pushToBrowserBySessionId(String sessionId, String json);

    public boolean pushToBrowserByToken(String token, String json);

    public boolean pushToAppByUserId(String userId, String json, String isTest);

    /*这个browserToken 用于app的webSocket断开时，推送一个app连接断开信息到置业呼叫界面*/
    public boolean pushToAppByUserId(String userId, String toAppJson, String cacheJson, String isTest);

    public boolean pushToAppByToken(String token, String json);

    //检测当前用户的弹屏是否有socket连接
    public boolean isFlagWebSocketChromePlugin(String userId);

    public String interruptAppCall(String sessionId, String userId, String targetCallPhone);

    public String closeAllAppConnetion();

    /**
     *
     * 通过serverId 推送到设备
     * @param serverId
     * @param data
     * @return
     */
    boolean pushToSwxByServerId(String serverId,String data);







}
